package com.icart.repositories;


import com.icart.entities.CuCustinfoEntity;
import com.icart.entities.WoServbookEntity;
import org.springframework.context.annotation.Scope;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
@Scope("prototype")
public interface WoservbookRepository extends BaseRepository<WoServbookEntity,Integer> {
    @Transactional
    @Query(nativeQuery = true,value = "update wo_servbook set stat=-1 where bookseq=?1")
    @Modifying(clearAutomatically = true)
    Integer cancelbook(String bookseq);
}

